<template>
	<tabBar :tabNavList="tabNavList" :showIndex="showIndex" color="rgb(145, 145, 145)" activeColor='rgb(254, 52, 48)'
		:isNeedSetNavTitle="false" @change="changePageTab"></tabBar>
</template>

<script>
	import tabBar from "./tabBar.vue"
	export default {
		props: ["showIndex"],
		components: {
			tabBar
		},
		name: "myTabBar",
		methods: {
			changePageTab(index, item) {
				if(index == 2){
					uni.navigateTo({
						url:item.url
					})
					return
				}
				uni.switchTab({
					url: item.url,

				})
			}
		},
		data() {
			return {
				tabNavList: [{
					id: 1,
					name: '首页',
					icon: '/static/images/user/index.png',
					activeIcon: '/static/images/index/home.png',
					url: "/pages/index/index"
				}, {
					id: 2,
					name: '新建订单',
					icon: '/static/images/user/add.png',
					activeIcon: '/static/images/user/add.png',
					bigType: true,
					url: "/pages/newOrder/index"
				}, {
					id: 3,
					name: '我的',
					icon: '/static/images/index/my.png',
					activeIcon: '/static/images/user/my.png',
					url: "/pages/user/index"
				}],
			};
		},
	}
</script>

<style>

</style>